package com.fakeDYChat.common.user.controller;

import com.fakeDYChat.common.common.domain.vo.resp.ApiResult;
import com.fakeDYChat.common.user.service.LoginService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "测试环境接口")
@RestController
public class TestController {
    private final LoginService loginService;

    public TestController(LoginService loginService) {
        this.loginService = loginService;
    }

    @GetMapping("/token")
    public ApiResult<String> getToken(@RequestParam Long uid) {
        return ApiResult.success(loginService.login(uid));
    }
}
